package com.superman.entity;

import java.util.Comparator;

public class Car_Brand_Category extends Car {
    private String brand;//品牌
    private String category;//类型

    public Car_Brand_Category() {
    }


    public Car_Brand_Category(String id, String car_number, String brand_id, String model, String color, String category_id,
                              String t_comments, double price, double rent, int status, int useable, String brand, String category) {
        super(id, car_number, brand_id, model, color, category_id, t_comments, price, rent, status, useable);
        this.brand = brand;
        this.category = category;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    @Override
    public String toString() {
        return super.toString() + '\t' +
                "brand='" + brand + '\t' +
                ", category='" + category;
    }

    public String userToString() {
        return  super.getId() + "\t" + super.getModel() + "\t" + super.getT_comments() + "\t" + brand + "(" + super.getBrand_id() + ")\t" +
                category + "(" + super.getCategory_id() + ")" + super.getRent() + "/元\t" + ((super.getStatus() == 0) ? "是":"否");
    }

    public String adminToString(){
        return userToString() + "\t" + ((super.getUseable() == 0) ? "上架":"下架");
    }

}
